package com.manage.func.ordermanagement.returnorder.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.manage.base.dao.impl.BaseDaoImpl;
import com.manage.func.ordermanagement.returnorder.dao.IReturnOrderDao;
import com.manage.func.ordermanagement.returnorder.model.ReturnOrderBean;
import com.manage.func.ordermanagement.returnorder.model.ReturnOrderBooksBean;
import com.manage.func.ordermanagement.returnorder.model.ReturnOrderExcelBean;
import com.manage.func.ordermanagement.returnorder.model.ReturnOrderExportQueryBean;

@Repository("returnOrderDao")
public class ReturnOrderDaoImpl extends BaseDaoImpl<ReturnOrderBean>implements IReturnOrderDao {

	@Override
	public List<ReturnOrderBean> selectReturnOrderList(ReturnOrderBean bean) {
		return getSqlSession().selectList("ReturnOrderMapper.selectReturnOrderList", bean);
	}

	@Override
	public int insertReturnOrder(ReturnOrderBean queryBean) {
		return getSqlSession().insert("ReturnOrderMapper.insertReturnOrder", queryBean);
	}

	@Override
	public int updateReturnOrder(ReturnOrderBean queryBean) {
		return getSqlSession().update("ReturnOrderMapper.updateReturnOrder", queryBean);
	}
	
	@Override
	public int updateOrderDetail(ReturnOrderBooksBean queryBean) {
		return getSqlSession().update("ReturnOrderMapper.updateOrderDetail", queryBean);
	}

	@Override
	public int selectTotalCount(ReturnOrderBean queryBean) {
		return getSqlSession().selectOne("ReturnOrderMapper.selectTotalCount", queryBean);
	}

	@Override
	public int deleteReturnOrder(ReturnOrderBean queryBean) {
		return getSqlSession().delete("ReturnOrderMapper.deleteReturnOrder", queryBean);
	}
	
	@Override
	public List<ReturnOrderBooksBean> selectReturnOrderBooks(ReturnOrderBean queryBean) {
		return getSqlSession().selectList("ReturnOrderMapper.selectReturnOrderBooks", queryBean);
	}
	
	@Override
	public int updateExpressMessage(ReturnOrderBean queryBean) {
		return getSqlSession().update("ReturnOrderMapper.updateExpressMessage", queryBean);
	}

	@Override
	public List<ReturnOrderExcelBean> selectReturnOrderExcel(ReturnOrderExportQueryBean queryBean)
	{
		return getSqlSession().selectList("ReturnOrderMapper.selectReturnOrderExcel", queryBean);
	}
}
